        <!DOCTYPE html>
        <html>
        <head>
                <meta charset="utf-8">
        <title>TypeMatcher abstract class / matcher Library / Dart Documentation</title>
        <link rel="stylesheet" type="text/css"
            href="../styles.css">
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico">
        
        </head>
        <body data-library="matcher" data-type="TypeMatcher">
        <div class="page">
        <div class="header">
          <a href="../index.html"><div class="logo"></div></a>
          <a href="../index.html">Dart Documentation</a>
         &rsaquo; <a href="../matcher.html">matcher</a> &rsaquo; <a href="../matcher/TypeMatcher.html">TypeMatcher</a>        <div id="search-box">
          <input type="search" name="q" id="q" autocomplete="off"
              class="search-input" placeholder="Search API">
        </div>
        
      </div>
      <div class="drop-down" id="drop-down"></div>
      
        <div class="nav">
        
</div>
<div class="content">
        <h2><strong>TypeMatcher</strong>
          abstract class
        </h2>
        
<button id="show-inherited" class="show-inherited">Hide inherited</button>
<div class="doc">
<pre class="source">
abstract class TypeMatcher extends BaseMatcher {
 final String _name;
 const TypeMatcher(this._name);
 Description describe(Description description) =&gt;
     description.add(_name);
}
</pre>
</div>
<h3>Extends</h3>
<p>
<span class="type-box"><span class="icon-class"></span><a href="../matcher/BaseMatcher.html">BaseMatcher</a></span>&nbsp;&gt;&nbsp;<span class="type-box"><span class="icon-class"></span><strong>TypeMatcher</strong></span></p>
<div>
<h3>Constructors</h3>
<div class="method"><h4 id="TypeMatcher">
<button class="show-code">Code</button>
const <strong>TypeMatcher</strong>(String _name) <a class="anchor-link" href="#TypeMatcher"
              title="Permalink to TypeMatcher.TypeMatcher">#</a></h4>
<div class="doc">
<pre class="source">
const TypeMatcher(this._name);
</pre>
</div>
</div>
</div>
<div>
<h3>Methods</h3>
<div class="method"><h4 id="describe">
<button class="show-code">Code</button>
<a href="../matcher/Description.html">Description</a> <strong>describe</strong>(<a href="../matcher/Description.html">Description</a> description) <a class="anchor-link" href="#describe"
              title="Permalink to TypeMatcher.describe">#</a></h4>
<div class="doc">
<div class="inherited">
<p>Creates a textual description of a matcher,
by appending to <code>mismatchDescription</code>.</p>
<div class="docs-inherited-from">docs inherited from <a href="../matcher/BaseMatcher.html">BaseMatcher</a> </div></div>
<pre class="source">
Description describe(Description description) =&gt;
   description.add(_name);
</pre>
</div>
</div>
<div class="method inherited"><h4 id="describeMismatch">
<button class="show-code">Code</button>
<a href="../matcher/Description.html">Description</a> <strong>describeMismatch</strong>(item, <a href="../matcher/Description.html">Description</a> mismatchDescription, <a href="../matcher/MatchState.html">MatchState</a> matchState, bool verbose) <a class="anchor-link" href="#describeMismatch"
              title="Permalink to TypeMatcher.describeMismatch">#</a></h4>
<div class="inherited-from">inherited from <a href="../matcher/BaseMatcher.html">BaseMatcher</a> </div><div class="doc">
<p>Generates a description of the matcher failed for a particular

<span class="param">item</span>, by appending the description to 
<span class="param">mismatchDescription</span>.
It does not check whether the 
<span class="param">item</span> fails the match, as it is
only called after a failed match. There may be additional info
about the mismatch in 
<span class="param">matchState</span>.</p>
<pre class="source">
Description describeMismatch(item, Description mismatchDescription,
                            MatchState matchState, bool verbose) =&gt;
 mismatchDescription.add('was ').addDescriptionOf(item);
</pre>
</div>
</div>
<div class="method inherited"><h4 id="matches">
abstract bool <strong>matches</strong>(item, <a href="../matcher/MatchState.html">MatchState</a> matchState) <a class="anchor-link" href="#matches"
              title="Permalink to TypeMatcher.matches">#</a></h4>
<div class="inherited-from">inherited from <a href="../matcher/BaseMatcher.html">BaseMatcher</a> </div><div class="doc">
<p>Tests the matcher against a given 
<span class="param">item</span>
and return true if the match succeeds; false otherwise.

<span class="param">matchState</span> may be used to return additional info for
the use of <code>describeMismatch</code>.</p>
</div>
</div>
</div>
        </div>
        <div class="clear"></div>
        </div>
        <div class="footer">
          
        </div>
        <script async src="../client-live-nav.js"></script>
        </body></html>
        
